-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.java
32 lines (25 loc) · 886 Bytes
/
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
double pontoX, pontoY;
pontoX = sc.nextDouble();
pontoY = sc.nextDouble();
if(pontoX == 0.0 && pontoY == 0.0)
System.out.println("Origem");
else if(pontoX == 0.0 && pontoY != 0.0)
System.out.println("Eixo Y");
else if(pontoX != 0.0 && pontoY == 0.0)
System.out.println("Eixo X");
else if(pontoX > 0.0 && pontoY < 0.0)
System.out.println("Q4");
else if(pontoX < 0.0 && pontoY > 0.0)
System.out.println("Q2");
else if(pontoX < 0.0 && pontoY < 0.0)
System.out.println("Q3");
else
System.out.println("Q1");
sc.close();
}
}